refactor logging (#582)
* refactor logging to
allow the noreturn attribute on fatal() to be used by analysis
tools while still generating messages with an output stream.
* Add our own message handler.
This allows us to use stderr on windows. The default message handler
routes QDebug messages to the debugger on windows.
* flush stdout before message logger writes to stderr.
* flush stdout before writing to standard error for fatal().
or else messages can appear in the wrong order on Windows.
18 files changed: